<!DOCTYPE html>
<html>
<head>
 <title>login3333</title>
 <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
 <script src="https://cdn.bootcss.com/js-sha1/0.6.0/sha1.min.js"></script>
 <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
 <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
 <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
 <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
<link href="../../ico.ico" rel="icon" type="image/x-icon" />
<script type="text/javascript">
	$(function  () {
        //login event    
		$('#login').on('click',function  () {


            




       if(regz()){
       	    let data={};
     	    data.phone=$('#user').val()
     	    data.password=sha1($('#password').val())
     	    data=JSON.stringify(data)
     	    let ur='/jd_mobile?order=login_phone2&data='+data	      
     	        ur=encodeURI(ur)

           location.href=ur
       }else{
		let data={};
     	    data.user=$('#user').val()
     	    data.password=sha1($('#password').val())
     	    data=JSON.stringify(data)
     	    let ur='/jd_mobile?order=login_user2&data='+data      
     	    ur=encodeURI(ur)
			 location.href=ur

       }
     
 
	   console.log(regz())
      })//login click end！！！！    
        
       
function regz () {
		var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;  
          if (!myreg.test($('#user').val())) {  
              return false;  
          } else {  
              return true;  
          }  
}     
	
	})
</script>
  
</head>


<body>
<div class="container" style="margin-top: 1%;">

		<div style="height: 100%;">
				<form class="bs-example bs-example-form" role="form" >
					<div class="input-group input-group-on'">
						<span class="input-group-addon">账号</span>
						<input type="text" id="user" class="form-control" placeholder="用户名/手机号">
					</div><br>
					<div class="input-group">
						<span class="input-group-addon">密码</span>
						<input id="password" type="password" class="form-control" placeholder="密码">
					</div><br>
						<a href="#" style="text-decoration: none;color: black;">忘记密码？</a>
						
						<div id="myButtons2" class="bs-example" style="margin-top: 20px;">
								<button type="button" id="login" class="btn btn-primary" 
										data-loading-text="Loading..." style="font-size:20px;width: 300px;background: #e4393c;border: #e4393c;">登陆
								</button>
						</div>
						<div style="text-align: right;padding: 20px;padding-right: 0px;">
							<a href="/jd/reg" style="text-decoration: none;colo:black;font-size: 15px;">立即注册>></a>
						</div>
						
				</form>
			</div>
  

  
		
</div>
</body>
</html>